public class Test {
    public static void main(String[] args) {
        BinaryTree2 tree2=new BinaryTree2();
        BinaryTree2.TreeNode root=tree2.createTree();
        tree2.preOrder(root);
        System.out.println();
        tree2.inOrder(root);
        System.out.println();
       tree2.postOrder(root);
        System.out.println();
        System.out.println("此二叉树的节点"+tree2.size(root));
        System.out.println("此二叉树的节点"+tree2.size2(root));
        System.out.println("此二叉树的叶子节点"+
                tree2.getLeafNodeCount1(root));
        System.out.println("此二叉树的叶子节点"+
                tree2.getLeafNodeCount2(root));
        System.out.println(
                tree2.getKLevelNodeCount(root, 3));
        System.out.println("此二叉树的高度"+tree2.getHeight(root));
        System.out.println(tree2.find(root, 'D'));
        tree2.levelOrder(root);
        System.out.println();
        System.out.println(tree2.isCompleteTree(root));
    }
}
